import type { ColumnsType } from 'antd/es/table'

export const nullStr = '--'

interface Item {
	value: number
	label: string
}
// 活动状态搜索
export const activeStatusSearch: Item[] = [
	{
		label: '有效',
		value: 1,
	},
	{
		label: '无效',
		value: 2,
	},
]
// 活动状态
export const activeStatus: Item[] = [
	{
		label: '无效',
		value: 0,
	},
	{
		label: '有效',
		value: 1,
	},
	{
		label: '无效',
		value: 2,
	},
]
/** 类型 */
export const disableStatusList: Item[] = [
	{
		label: '',
		value: 0,
	},
	{
		label: '启用',
		value: 2,
	},
	{
		label: '停用',
		value: 1,
	}
]

export const leaseTerm: Item[] = [
	{
		label: '1',
		value: 1,
	},
	{
		label: '2',
		value: 2,
	},
	{
		label: '3',
		value: 3,
	},
	{
		label: '4',
		value: 4,
	},
	{
		label: '5',
		value: 5,
	},
	{
		label: '6',
		value: 6,
	},
	{
		label: '7',
		value: 7,
	},
	{
		label: '8',
		value: 8,
	},
	{
		label: '9',
		value: 9,
	},
	{
		label: '10',
		value: 10,
	},
	{
		label: '11',
		value: 11,
	},
	{
		label: '12',
		value: 12,
	},
	{
		label: '13',
		value: 13,
	},
	{
		label: '14',
		value: 14,
	},
	{
		label: '15',
		value: 15,
	},
	{
		label: '16',
		value: 16,
	},
	{
		label: '17',
		value: 17,
	},
	{
		label: '18',
		value: 18,
	},
	{
		label: '19',
		value: 19,
	},
	{
		label: '20',
		value: 20,
	},
	{
		label: '21',
		value: 21,
	},
	{
		label: '22',
		value: 22,
	},
	{
		label: '23',
		value: 23,
	},
	{
		label: '24',
		value: 24,
	},
	{
		label: '25',
		value: 25,
	},
	{
		label: '26',
		value: 26,
	},
	{
		label: '27',
		value: 27,
	},
	{
		label: '28',
		value: 28,
	},
	{
		label: '29',
		value: 29,
	},
	{
		label: '30',
		value: 30,
	},
	{
		label: '31',
		value: 31,
	},
	{
		label: '32',
		value: 32,
	},
	{
		label: '33',
		value: 33,
	},
	{
		label: '34',
		value: 34,
	},
	{
		label: '35',
		value: 35,
	},
	{
		label: '36',
		value: 36,
	},
]
export const isExaminationInterval: Item[] = [
	{
		label: '算头',
		value: 1,
	},
	{
		label: '算尾',
		value: 2,
	},
]
// 实物类型
export const isEntityType: Item[] = [
	{
		label: '虚拟奖品',
		value: 1,
	},
	{
		label: '实体奖品',
		value: 2,
	},
]

export const isRecover: Item[] = [
	{
		label: '是',
		value: 1,
	},
	{
		label: '否',
		value: 2,
	},
]
// 审核状态
export const auditStatus: Item[] = [
	{
		label: '待审核',
		value: 1,
	},
	{
		label: '审核中',
		value: 2,
	},
	{
		label: '审核通过',
		value: 3,
	},
	{
		label: '审核驳回',
		value: 4,
	},
]
// subsidyType 订单补贴类型 新签/续签/提前续
export const subsidyType: Item[] = [
	{
		label: '新签',
		value: 1,
	},
	{
		label: '续签',
		value: 2,
	},
	{
		label: '提前续',
		value: 3,
	},
]
// activitiesType 1.返现 2.实物 3.免租 4.延租
export const activitiesType: Item[] = [
	{
		label: '返现',
		value: 1,
	},
	{
		label: '实物',
		value: 2,
	},
	{
		label: '免租',
		value: 3,
	},
	{
		label: '延租',
		value: 4,
	},
]
export const leaseType = [
	{
		value: 1,
		label: '经租',
	},
	{
		value: 2,
		label: '融租',
	},
	{
		value: 3,
		label: '以租代购',
	},
	{
		value: 4,
		label: '直购',
	},
]
// 线索管理表格列
export const DriverRewardRulesColumns: any[] = [
	{
		title: '开始时间 ',
		dataIndex: 'startTime',
		align: 'center',
		width: 150,
		ellipsis: true,
		render: (text: string) => text || nullStr,
	},
	{
		title: '结束时间',
		dataIndex: 'endTime',
		align: 'center',
		width: 150,
		ellipsis: true,
		render: (text: string) => text || nullStr,
	},
	{
		title: '主体名称',
		dataIndex: 'subjectName',
		align: 'center',
		width: 150,
		ellipsis: true,
		render: (text: string) => text || nullStr,
	},
	{
		title: '所属公司',
		dataIndex: 'orgName',
		align: 'center',
		width: 150,
		ellipsis: true,
		render: (text: string) => text || nullStr,
	},
	{
		title: '城市名称',
		dataIndex: 'cityName',
		align: 'center',
		width: 150,
		ellipsis: true,
		render: (text: string) => text || nullStr,
	},
	{
		title: '租赁类型',
		dataIndex: 'leaseTypename',
		align: 'center',
		width: 150,
		ellipsis: true,
		render: (text: string) => text || nullStr,
	},
	{
		title: '品牌/车型/车系',
		dataIndex: 'modeInfo',
		align: 'center',
		width: 200,
		ellipsis: true,
		render: (text: string) => text || nullStr,
	},
	{
		title: '租期',
		dataIndex: 'leaseTerm',
		align: 'center',
		width: 100,
		ellipsis: true,
		render: (text: string) => text || nullStr,
	},
]

export const Relevance: any[] = [
	{
		title: '商品方案ID',
		dataIndex: 'commodityNo',
		align: 'center',
		width: 150,
		ellipsis: true,
		render: (text: string) => text || nullStr,
	},
	{
		title: '商品方案名称',
		dataIndex: 'commodityName',
		align: 'center',
		width: 150,
		ellipsis: true,
		render: (text: string) => text || nullStr,
	},
	{
		title: '品牌/车系/车型',
		dataIndex: 'brandInfo',
		align: 'center',
		width: 150,
		ellipsis: true,
		render: (text: string) => text || nullStr,
	},
	{
		title: '星级',
		dataIndex: 'carStar',
		align: 'center',
		width: 150,
		ellipsis: true,
		render: (text: string) => text || nullStr,
	},
	{
		title: '订单类型名称',
		dataIndex: 'rentTypeName',
		align: 'center',
		width: 150,
		ellipsis: true,
		render: (text: string) => text || nullStr,
	},
	{
		title: '定金',
		dataIndex: 'depositAmount',
		align: 'center',
		width: 150,
		ellipsis: true,
		render: (text: string) => text || nullStr,
	},
	{
		title: '押金',
		dataIndex: 'mortgageAmount',
		align: 'center',
		width: 150,
		ellipsis: true,
		render: (text: string) => text || nullStr,
	},
	{
		title: '租期',
		dataIndex: 'leaseTerm',
		align: 'center',
		width: 150,
		ellipsis: true,
		render: (text: string) => text || nullStr,
	},
	{
		title: '月租金（新签）',
		dataIndex: 'rentAmount',
		align: 'center',
		width: 150,
		ellipsis: true,
		render: (text: string) => text&&Number(text)>=0?text: nullStr,
	},
	{
		title: '月租金（续签）',
		dataIndex: 'renewRentAmount',
		align: 'center',
		width: 150,
		ellipsis: true,
		render: (text: string) => text&&Number(text)>=0?text: nullStr,
	},
]
// eslint-disable-next-line no-shadow
export enum PageType {
	Add = 'add',
	Edit = 'edit',
	Detail = 'detail',
}



export const selectType: any = {
	1: '返现',
	2: '实物',
	3: '免租',
	4: '延租',
}

export const SendTimeOptions = [
	{ label: '首期', value: 1 },
	{ label: '每期', value: 2 },
	{ label: '指定期', value: 3 },
	{ label: '尾期', value: 4 },
]

export const basicInformation: any = {
	司机奖励ID: '',
	奖励名称: '',
	主体名称: '',
	城市名称: '',
	所属公司: '',
	'品牌/车型/车系': '',
	租期: '',
	租赁类型: '',
	奖励类型: '',
	提前续规则: '',
	结束时间: '',
	开始时间: '',
	备注: '',
}

export const driverReward: any = {
	活动类型: '',
	发放时间: '',
	延租天数: '',
	违反规定是否追回: '',
}

export const safeList: any = [{
	label: '无欠租',
	value: 1
}, {
	label: '无违章',
	value: 2
}, {
	label: '无出险',
	value: 3
}, {
	label: '完成车检时间',
	value: 4
}]


export const errorColumns: ColumnsType<any> = [
	{
		title: '奖励名称',
		dataIndex: 'rewardName',
		align: 'center',
		width: 200,
	},
	{
		title: '生效时间',
		dataIndex: 'startTime',
		align: 'center',
		width: 200,
	},
	{
		title: '失效时间',
		dataIndex: 'endTime',
		align: 'center',
		width: 200,
	},
	{
		title: '主体',
		dataIndex: 'subjectName',
		align: 'center',
		width: 200,
	},
	{
		title: '城市',
		dataIndex: 'cityName',
		align: 'center',
		width: 200,
	},
	{
		title: '品牌车系车型',
		dataIndex: 'fullName',
		align: 'center',
		width: 200,
	},
	{
		title: '订单类型',
		dataIndex: 'leaseTypename',
		align: 'center',
		width: 200,
	},
	{
		title: '租期',
		dataIndex: 'leaseTerm',
		align: 'center',
		width: 200,
	},
	{
		title: '补贴订单类型',
		dataIndex: 'subsidyTypename',
		align: 'center',
		width: 200,
	},
	{
		title: '活动类型',
		dataIndex: 'activitiesType',
		align: 'center',
		width: 200,
	},
	{
		title: '发放时间',
		dataIndex: 'entityType',
		align: 'center',
		width: 200,
	},
	{
		title: '发放指定期数',
		dataIndex: 'numberPeriods',
		align: 'center',
		width: 200,
	},
	{
		title: '天数',
		dataIndex: 'extendedRentalDays',
		align: 'center',
		width: 200,
	},
	{
		title: '金额',
		dataIndex: 'amount',
		align: 'center',
		width: 200,
	},
	{
		title: '考核区间选择',
		dataIndex: 'examinationInterval',
		align: 'center',
		width: 200,
	},
	{
		title: '提车后X天获得人证',
		dataIndex: 'conformance',
		align: 'center',
		width: 200,
	},
	{
		title: '无欠租',
		dataIndex: 'securityOne',
		align: 'center',
		width: 200,
	},
	{
		title: '无违章',
		dataIndex: 'securityTwo',
		align: 'center',
		width: 200,
	},
	{
		title: '无出险',
		dataIndex: 'securityThree',
		align: 'center',
		width: 200,
	},
	{
		title: '在指定日期前完成车检',
		dataIndex: 'transportCapacity',
		align: 'center',
		width: 200,
	},
	{
		title: '日均TSH',
		dataIndex: 'dailyAverageTsh',
		align: 'center',
		width: 200,
	},
	{
		title: '月TSH',
		dataIndex: 'monthTsh',
		align: 'center',
		width: 200,
	},
	{
		title: '日均高峰TSH',
		dataIndex: 'dailyPeakTsh',
		align: 'center',
		width: 200,
	},
	{
		title: '月高峰TSH',
		dataIndex: 'monthlyPeakTsh',
		align: 'center',
		width: 200,
	},
	{
		title: '日均完单量',
		dataIndex: 'dailyCompleteQuantity',
		align: 'center',
		width: 200,
	},
	{
		title: '月完单量',
		dataIndex: 'monthlyCompleteQuantity',
		align: 'center',
		width: 200,
	},
	{
		title: '异常原因',
		dataIndex: 'errorMsg',
		align: 'center',
		fixed: 'right',
		width: 200,
	},
]
